package com.powerdata.core.paimon.bean.table;


import java.util.List;

/**
 * hive 建表或更新表请求封装bean
 *
 * @author wangyongtao
 */

public class HiveCreateOrUpdateTableRequest {
    public String id;

    /**
     * hive数据源唯一标示
     */
    public String clusterCode;

    // 库名
    public String dbName;

    // 表名
    public OldNewValue<String> tableName;

    // 表注释名
    public OldNewValue<String> tableComment;

    // 表类型 （管理表 MANAGED、外部表 EXTERNAL、临时表 TEMPORARY）
    public String tableType = "MANAGED";

    // 行格式化：字段分隔符定义,默认\t
    public String fieldTerminated = "\t";

    //存储文件格式
    public OldNewValue<String> fileFormat;

    // 普通字段列表
    public List<CreateOrUpdateColumn> columns;

    // 分区字段列表
    public List<CreateOrUpdateColumn> partitions;

    // 初始化文件位置
    public String hdfsLocation;

    // 表占用空间大小（单位：KB）
    public long totalSize;

    // 表创建时间
    public String createTime;

    // 分区数
    public int numPartitions;

    // 判断表是否已有数据
    public Boolean hasData = true;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getClusterCode() {
        return clusterCode;
    }

    public void setClusterCode(String clusterCode) {
        this.clusterCode = clusterCode;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public OldNewValue<String> getTableName() {
        return tableName;
    }

    public void setTableName(OldNewValue<String> tableName) {
        this.tableName = tableName;
    }

    public OldNewValue<String> getTableComment() {
        return tableComment;
    }

    public void setTableComment(OldNewValue<String> tableComment) {
        this.tableComment = tableComment;
    }

    public String getTableType() {
        return tableType;
    }

    public void setTableType(String tableType) {
        this.tableType = tableType;
    }

    public String getFieldTerminated() {
        return fieldTerminated;
    }

    public void setFieldTerminated(String fieldTerminated) {
        this.fieldTerminated = fieldTerminated;
    }

    public OldNewValue<String> getFileFormat() {
        return fileFormat;
    }

    public void setFileFormat(OldNewValue<String> fileFormat) {
        this.fileFormat = fileFormat;
    }

    public List<CreateOrUpdateColumn> getColumns() {
        return columns;
    }

    public void setColumns(List<CreateOrUpdateColumn> columns) {
        this.columns = columns;
    }

    public List<CreateOrUpdateColumn> getPartitions() {
        return partitions;
    }

    public void setPartitions(List<CreateOrUpdateColumn> partitions) {
        this.partitions = partitions;
    }

    public String getHdfsLocation() {
        return hdfsLocation;
    }

    public void setHdfsLocation(String hdfsLocation) {
        this.hdfsLocation = hdfsLocation;
    }

    public long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(long totalSize) {
        this.totalSize = totalSize;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getNumPartitions() {
        return numPartitions;
    }

    public void setNumPartitions(int numPartitions) {
        this.numPartitions = numPartitions;
    }

    public Boolean getHasData() {
        return hasData;
    }

    public void setHasData(Boolean hasData) {
        this.hasData = hasData;
    }
}
